@import 'variables';
@import 'fonts';
@import 'loader';

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  min-width: 1200px;
}

body {
  height: 100%;
  background-color: #ffffff;
}

#main {
  min-height: 400px;
  display: grid;
  height: 100%;
  grid-template-columns: 200px 1fr;
  grid-template-rows: 57px 1fr;
  grid-template-areas:
    'head head'
    'nav main';
  #fixedHeader {
    grid-area: head;
    z-index: 1300;
    width: 100%;
    border-bottom: 1px solid @bordercolor;
    height: 57px;
  }
  .leftFixed.leftNav {
    grid-area: nav;
    min-height: 500px;
    width: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: @lightestgrey;
    border-right: 1px solid @lightergrey;
    ul {
      margin-right: -1px;
    }
  }
  .rightFluid.container {
    grid-area: main;
    overflow: auto;
    margin-left: 0;
    border-left: none;
    background-color: #ffffff;
  }
}

/* General */

.green {
  color: @green;
}

.red {
  color: @red;
}

.text-color {
  color: @text!important;
}
.text-muted {
  color: @textmuted;
}

.warning {
  color: @errorStyleColor !important;
  font-size: 14px !important;
}
a.warning:hover {
  color: lighten(@errorStyleColor, 10%) !important;
}

.lightestgrey {
  background-color: @lightestgrey;
}
.lightgrey {
  background-color: @lightgrey;
}
.grey {
  background-color: @grey;
}

.box-sizing (@type: border-box) {
  -webkit-box-sizing: @type;
  -moz-box-sizing: @type;
  box-sizing: @type;
}

.full-screen {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: #ffffff;
}

ul.unstyled {
  list-style: none;
  padding-left: 0;
}

.auto {
  display: block;
  margin: auto;
}

.invisible {
  visibility: hidden;
}

time {
  white-space: nowrap;
}

/* icon */

.pending-icon {
  background-image: url('../assets/img/pending_status.png');
}

/* Type */

body {
  font-family: Lato, sans-serif;
  font-size: 13px;
  margin: 0;
  color: @text;
}

.italic {
  font-style: italic;
}

.bold {
  font-weight: bold;
}

a,
span.link {
  font-weight: bold;
  text-decoration: none;
  color: @linkgreen;
  cursor: pointer;

  &:hover {
    color: @linkhover;
  }

  &.small {
    font-size: 13px;
  }
}

ul.link-list {
  .active {
    font-weight: bold;
    color: @text;
    border-bottom: 1px solid @text;
    padding-bottom: 2px;
  }

  &.horizontal {
    li {
      float: left;
      margin-right: 2 * @defaultGutterWidth;
    }
    margin-bottom: 10px;
  }
}

.capitalized {
  text-transform: capitalize;
}

.capitalized-start::first-letter {
  text-transform: capitalize;
}

.uppercased {
  text-transform: uppercase;
}

.text-overflow {
  overflow: hidden;
  text-overflow: ellipsis;
}

.break-word {
  white-space: normal;
  word-wrap: break-word;
}

.break-all {
  white-space: normal;
  word-wrap: break-all;
}

.clear {
  clear: both;
}

.hidden {
  display: none !important;
}
.transparent {
  opacity: 0;
}

.relative {
  position: relative;
}
.absolute {
  position: absolute !important;
}

.margin {
  margin: 2 * @defaultGutterWidth;
}
.margin-small {
  margin: @defaultGutterWidth;
}
.margin-large {
  margin: 3 * @defaultGutterWidth;
}
.margin-top {
  margin-top: 2 * @defaultGutterWidth;
}
.margin-top-small {
  margin-top: @defaultGutterWidth;
}
.margin-top-none {
  margin-top: 0;
}
.margin-top-large {
  margin-top: 3 * @defaultGutterWidth;
}
.margin-left {
  margin-left: 2 * @defaultGutterWidth;
}
.margin-left-small {
  margin-left: @defaultGutterWidth;
}
.margin-left-large {
  margin-left: 3 * @defaultGutterWidth;
}
.margin-right {
  margin-right: 2 * @defaultGutterWidth;
}
.margin-right-small {
  margin-right: @defaultGutterWidth;
}
.margin-right-large {
  margin-right: 3 * @defaultGutterWidth;
}
.margin-bottom {
  margin-bottom: 2 * @defaultGutterWidth;
}
.margin-bottom-large {
  margin-bottom: 3 * @defaultGutterWidth;
}
.margin-bottom-small {
  margin-bottom: @defaultGutterWidth;
}
.margin-bottom-none {
  margin-bottom: 0;
}

.padding-right {
  padding-right: 3 * @defaultGutterWidth;
}

.padding-top {
  padding-top: 2 * @defaultGutterWidth;
}
.padding-bottom {
  padding-bottom: 2 * @defaultGutterWidth;
}

.inline-block {
  display: inline-block;
}

.inline {
  display: inline;
}

.block {
  display: block;
}

.float-right {
  float: right;
}

.float-left {
  float: left;
}

.align-left {
  text-align: left;
}

.align-right {
  text-align: right;
}

.align-center {
  text-align: center;
}

.clickable {
  cursor: pointer;
}

.muted {
  opacity: 0.4;
}

.hoverText:hover > hr {
  border-bottom: 2px solid @bordercolor !important;
}

.fadeIn {
  .animation(fadein 0.2s 1);
}
.fadeOut {
  .opacity(0);
  .transition(opacity 0.2s linear);
}

.fadeInSlow {
  .animation(fadein 0.8s 1);
}
.fadeOutSlow {
  .opacity(0);
  .transition(opacity 0.6s linear);
}

/* Navigation */
.navLink {
  transition: all 100ms cubic-bezier(0.23, 1, 0.32, 1) 0ms;
  color: #949495;
  &.leftNav.active {
    background: white;
    border-top: 1px solid #eaf4f3;
    border-bottom: 1px solid #eaf4f3;
    transition: all 100ms cubic-bezier(0.23, 1, 0.32, 1) 0ms;
  }
  &.leftNav:first-of-type {
    border-top: none;
  }
  &.settingsNav.active,
  &.helpNav.active {
    background: @lightestgrey;
  }
}

.navLink.leftNav > div > span {
  color: #949495;
}
.navLink.leftNav.active > div > span {
  color: rgba(0, 0, 0, 0.87);
}
.navLink.leftNav:hover {
  background-color: rgba(0, 0, 0, 0.08);
}

/* Header */

.header .material-icons {
  color: @grey !important;
  margin-left: 7px;
  vertical-align: middle;
}

#logo {
  display: block;
  position: relative;
  min-width: 142px;
  height: 48px;
  background-image: url('../assets/img/headerlogo.png');
  background-repeat: no-repeat;
  background-size: contain;

  &.enterprise {
    background-image: url('../assets/img/headerlogo-enterprise.png');
  }
}

#demoBox,
#announcement {
  border-left: 1px solid @lightergrey;
  padding: 4px 2 * @defaultGutterWidth;
  margin: 14px 0;
  font-size: 14px;
  max-height: 56px;
  min-width: 164px;
  overflow: hidden;
  svg {
    color: @linkgreen !important;
    &.red {
      color: @red !important;
    }
  }
}

#announcement {
  padding: 0 @defaultGutterWidth;
}

.header .header-section {
  height: 24px;
  font-size: 14px;
  color: @grey;
  margin: 14px 0;
  padding-left: 36px;
  padding-right: 36px;
  border-right: 1px solid @lightergrey;
  display: flex;
  align-items: center;
  &:first-of-type {
    border-left: 1px solid @lightergrey;
  }

  &:hover {
    color: darken(@grey, 10%);
    cursor: pointer;
    .material-icons {
      color: darken(@grey, 10%) !important;
    }

    // hover warning
    .warning {
      a,
      .material-icons,
      span {
        color: lighten(@errorStyleColor, 10%) !important;
      }
    }
  }

  // no hover warngin
  .warning {
    a,
    .material-icons,
    span {
      color: @errorStyleColor !important;
    }
  }

  // hover warning
  .approaching {
    a,
    .material-icons,
    span {
      color: lighten(orange, 10%) !important;
    }
  }

  // no hover warngin
  .approaching {
    a,
    .material-icons,
    span {
      color: orange !important;
    }
  }

  > * > * {
    vertical-align: middle;
  }
}

.header .header-dropdown:hover .material-icons {
  color: darken(@grey, 10%) !important;
}

/* Layout */

.tab-container {
  position: relative;
  padding-top: 2 * @defaultGutterWidth;
  min-height: 60vh;
}

.flexbox {
  display: flex;
  overflow: hidden;
  &.centered {
    justify-content: center;
    align-items: center;
  }
  &.column {
    flex-direction: column;
  }
  &.space-between {
    justify-content: space-between;
  }
  &.no-basis {
    flex-basis: 0;
  }
}

.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-column-gap: 2 * @defaultGutterWidth;
}

.overflow-hidden {
  overflow: hidden;
}

.allow-overflow {
  overflow: visible;
}

.align-top {
  display: inline-block;
  vertical-align: top;
}

.align-middle {
  vertical-align: middle;
}

.align-bottom {
  vertical-align: bottom;
}

.leftFixed {
  width: @defaultLeftBarWidth;
  float: left;
  position: relative;

  .innerBlock {
    width: 100%;
    margin-right: -1 * @defaultLeftBarWidth;
    padding-top: 20px;
  }
}

.rightFluid {
  margin-left: @defaultLeftBarWidth;
  padding: 2 * @defaultGutterWidth;
  position: relative;
  border-left: 1px solid @lightergrey;
  min-height: 80vh;
}

.spaced-list > li {
  margin-top: 20px;
}

.tableActions {
  padding: 20px 0 20px 28px;
}

.dialog {
  .transition(width 1s ease-in-out) !important;
}

.largeDialog {
  width: inherit !important;
  max-width: 96% !important;
  .transition(width 1s ease-in-out) !important;
}

.dialogTableContainer {
  .deviceList {
    min-width: initial;
  }

  .transition(opacity 0.4s ease-in) !important;
  overflow: hidden;
  position: relative;
  opacity: 1;
  min-height: 47vh;

  &.zero {
    min-height: 100px;
    height: 100px;
    opacity: 0;
    padding: 0;
  }
}

.split-dialog {
  width: 50%;
  display: inline-block;
  padding: 10px;
  vertical-align: top;

  &.left-border {
    border-left: solid 1px @lightgrey;
  }
}

// Onboarding

.onboard {
  padding: 2 * @defaultGutterWidth @defaultGutterWidth;
  border-style: dashed;
  border-color: @placeholder;
  border-width: 2px;
  text-align: center;
  position: relative;
  background-color: inherit;

  p {
    margin-top: 0;
    font-size: 1.25em;
  }

  &.widget p {
    font-size: inherit;
  }
}

// tooltips
.tooltip {
  position: absolute;
  cursor: pointer;

  .transition(opacity 0.4s ease-in);
  .transition(transform 0.4s ease-in);

  &.info {
    top: 2px;
    right: 0px;
    .material-icons {
      .opacity(0.6);
      color: @grey !important;
    }
  }

  &.help {
    left: 50%;
    margin-left: -16px;
    z-index: 10;
    .material-icons,
    svg {
      color: @alertpurple !important;
    }

    &.highlight .material-icons,
    &.highlight svg {
      width: 1.3em;
      height: 1.3em;
      border-radius: 50%;
      border: @alertpurple 4px solid;
      .animation(highlight 2.2s infinite);
    }
  }

  &:hover {
    .opacity(1);
    .animation(bounce 0.4s forwards);
  }
}

.onboard-icon {
  background: @mendergreen;
  border-radius: 50%;
  height: 2 * @defaultGutterWidth;
  width: 2 * @defaultGutterWidth;
  align-items: center;
  justify-content: center;
  display: flex;
  z-index: 1000;
  color: @placeholder;
  border: white 1px solid;
}

.dialog-content {
  margin: 30px;
  min-height: 30vh;
}

.onboard-dialog {
  display: flex;
  > div {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
  }
  .os-list {
    margin-bottom: 2 * @defaultGutterWidth;
    img {
      height: 80px;
      margin: @defaultGutterWidth;
      margin-bottom: 2 * @defaultGutterWidth;
    }
  }
  .react-tooltip {
    width: 300px;
  }
}

.onboard-tip {
  pointer-events: auto;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
  position: absolute;
  a {
    color: @placeholder;
    text-decoration: underline;
  }
  .onboard-icon {
    &.top,
    &.bottom {
      .animation(bouncedownup 1.3s infinite);
    }
    &.left {
      .animation(bouncerightleft 1.3s infinite);
    }
    &.right {
      .animation(bounceleftright 1.3s infinite);
    }
  }

  .content {
    background-color: @linkgreen;
    font-size: 14px;
    color: @placeholder;
    margin: 0;
    width: 350px;
    padding: 12px 18px;
    text-align: left;
    &.top {
      margin-top: @defaultGutterWidth;
    }
    &.bottom {
      margin-top: -1 * @defaultGutterWidth;
    }
    &.right {
      margin-left: -1 * @defaultGutterWidth;
    }
    &.left {
      margin-left: @defaultGutterWidth;
    }
    > div:first-of-type {
      padding-top: @defaultGutterWidth;
      padding-bottom: 10px;
    }
    .flexbox {
      justify-content: space-between;
    }
    .centered {
      justify-content: center;
    }
    .button {
      color: @text;
      text-decoration: inherit;
    }
  }
}
.onboard-snack {
  background-color: @text;
  color: @placeholder;
  padding: 20px;
  border-radius: 4px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
  position: relative;
  > .flexbox {
    flex-direction: column;
    min-width: 300px;
    max-width: 90%;
  }
  button {
    color: @placeholder;
    padding: 8px;
    position: absolute;
    right: 5px;
    top: @defaultGutterWidth;
  }
  ol {
    padding-inline-start: 0;
    li {
      list-style: none;
      &:before {
        content: '';
        vertical-align: text-top;
        margin-right: 35px;
      }
      &.completed:before {
        content: url('../assets/img/success_status.png');
        margin-right: 10px;
      }
    }
  }
  .onboard-icon {
    vertical-align: middle;
    display: inline-flex;
    margin: 0 5px;
  }
}

.dashboard {
  .hint {
    font-size: small;
  }
  .tiny {
    font-size: 10px;
  }
  .notActive {
    background: @lightestgrey;
  }
  .widget {
    display: flex;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    margin: 0 3vw 3vw 0;
    height: 180px;
    width: 250px;
    position: relative;
    padding: 1vw;
    transition: all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms;
    &.notActive:hover {
      box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 3px, rgba(0, 0, 0, 0.1) 0px 1px 3px;
    }
    &.onboard:hover {
      border-color: darken(@placeholder, 10%);
    }
  }
  .widgetHeader,
  .widgetMainContent,
  .widgetFooter {
    width: 100%;
  }
  .widgetHeader,
  .widgetFooter {
    color: @verylightgrey;
    border-color: @placeholder;
    border-width: 1px;
    justify-content: center;
  }
  .widgetHeader {
    padding-bottom: 10px;
  }
  .widgetFooter {
    padding-top: 10px;
    font-weight: normal;
  }
  .widgetMainContent {
    padding: 10px @defaultGutterWidth;
    align-items: center;
    flex-grow: 1;
    .header {
      margin-bottom: 1pt;
    }
    .counter {
      font-size: xx-large;
    }
  }
  .link {
    font-size: small;
  }
}

.react-tooltip {
  background-color: @mendermaroon !important;
  pointer-events: auto !important;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
  text-align: left;
  margin-left: 6px !important;
  max-width: 600px;
  color: @textsecondary !important;
  &.info {
    max-width: 300px;
    color: @textmuted !important;
    background-color: @placeholder !important;
    &.place-top:after {
      border-top-color: @placeholder !important;
    }
  }
  p {
    font-size: 14px;
  }

  a {
    color: @linksecondary;
  }

  hr {
    margin-bottom: @defaultGutterWidth;
  }

  .hidehelp {
    float: right;
    margin-top: @defaultGutterWidth;
    margin-bottom: 5px;
  }

  &.place-bottom:after {
    border-bottom-color: @mendermaroon !important;
  }
  &.place-right:after {
    border-right-color: @mendermaroon !important;
  }
  &.place-left:after {
    border-left-color: @mendermaroon !important;
  }
  &.place-top:after {
    border-top-color: @mendermaroon !important;
  }
}

//  Help section
.help-container {
  min-height: 400px;
  height: 100%;
  display: flex;
  > ul {
    min-width: 210px;
    width: @defaultLeftBarWidth;
    border-right: 1px solid @lightergrey;
    overflow: auto;
    height: 90vh;
  }
  > div {
    overflow: auto;
    width: 100%;
    padding-top: 1px;
    padding-left: 70px;
  }
}

.help-content {
  font-size: @defaultGutterWidth;
  line-height: 1.5em;

  h3 {
    margin-top: 2.5em;
  }

  .note {
    padding: 20px;
    background-color: @lightestgrey;
    border-radius: 5px;
    color: #949495;
  }
}

.help-section {
  width: 160px;
  height: 160px;
  padding: 20px;
  display: inline-block;
  text-align: center;
  margin-right: 40px;
  margin-top: 40px;
  cursor: pointer;
  font-size: @defaultGutterWidth;
  color: @linkgreen !important;
  .scale(0.99);
  &:hover {
    .scale(1);
    color: @linkhover !important;
    svg {
      color: @linkhover !important;
    }
  }

  svg {
    height: 34px !important;
    width: 34px !important;
    margin-top: 20px;
    color: @linkgreen !important;
  }
}

#software-support {
  margin-top: 10vh;
  margin-bottom: 5vh;
  hr {
    border: none;
    border-bottom: 1px solid @lightergrey;
    margin-bottom: 5vh;
  }
}

// Icons
.material-icons {
  &.green {
    background: none;
    color: @green !important;
  }
  &.red {
    background: none;
    color: @red !important;
  }
}
.rotated {
  .rotate(-45deg);
}

.absoluteTextfieldButton {
  position: absolute;
  top: 70px;
  left: 24px;
  .transition(all 0.42s ease-in-out) !important;
  z-index: 1400;
  display: inline-block;
  &.top-right {
    left: 478px;
  }
}

.fixedSearch {
  position: fixed;
  left: 24px;
  right: 24px;
  top: 72px;
  padding: 24px 0;
  background-color: white;
  z-index: 30000;
}

.top-right {
  position: absolute !important;
  top: 0;
  right: 0;
}

.widget {
  width: 50%;
  min-height: 175px;
  float: left;
  padding: 22px 4% 22px;
  margin: 0 @defaultGutterWidth 2 * @defaultGutterWidth;

  &.small {
    width: 20%;
  }
}

.filter-wrapper {
  background-color: #fafbfc;
  overflow-y: auto;
  padding: 10px 20px;
}

.maxTable {
  max-height: 50vh;
  overflow: auto;
}

// custom style for checkbox
table tbody.clickable tr > td:first-child,
table thead.clickable tr > th:first-child {
  padding-right: 0;
  width: 1vw;
}

.columnHeader {
  cursor: pointer;
  display: flex;
  align-items: center;
  .sortIcon {
    visibility: hidden;
    .transition(visibility 0.1s ease-in) !important;
  }
  .material-icons {
    color: @grey;
  }
  &:hover {
    visibility: visible;
    // .opacity(0.4);
    // color: #aeaeae;
  }
  &:hover .sortIcon.selected,
  .sortIcon.selected {
    .opacity(1);
    visibility: visible;
    .transition(all 0.15s ease-in-out) !important;
  }
}

.sortIcon.false {
  .rotateX(180deg) !important;
}

.tableSearch {
  display: inline-block;
  margin-left: 3 * @defaultGutterWidth;
  position: relative;
  top: -4px;
}

.search {
  input,
  input:focus {
    outline: none;
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: solid 1px @bordercolor;
    padding: 7px 0;
    padding-left: 32px;
    font-size: 13px;
    font-family: Lato, sans-serif;
    color: rgba(0, 0, 0, 0.8);

    .placeholder({color: rgba(0, 0, 0, 0.3) ; content: 'Search' ;});
  }
}

.search::before {
  content: '\26b2';
  display: block;
  position: absolute;
  width: @defaultGutterWidth;
  z-index: 3;
  height: @defaultGutterWidth;
  transform: rotate(-45deg);
  font-size: 20px;
  line-height: 32px;
  color: rgba(0, 0, 0, 0.3);
}

.fixedSearch .search::before {
  top: 10px;
  left: 8px;
}

.closeSlider {
  box-shadow: rgba(0, 0, 0, 0.156863) -2px 0px 4px -9px, rgba(0, 0, 0, 0.227451) -5px 0px 5px -2px !important;
  &:hover {
    background-color: #ebebeb !important;
  }
}

/* report view */

.report-list,
.list-item {
  vertical-align: top;
  &.list-item-large {
    width: 60%;
  }
  ul {
    display: flex;
    flex-wrap: wrap;
    & > div {
      flex: 0 45%;
      margin-right: 2 * @defaultGutterWidth;
    }
  }
}

.list-horizontal-flex {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  > div {
    margin-right: 2vw;
    flex-basis: 300px;
  }
}

.expandedButton {
  margin-top: 12px;
}

.file-details {
  padding: 10px @defaultGutterWidth 2 * @defaultGutterWidth;
  width: 100%;
  border-radius: 4px;
  margin: 10px 3px 20px 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
  position: relative;
}
.file-meta {
  padding: 0 16px;
}

.file-upload-form {
  display: grid;
  grid-template-columns: 400px 1fr;
  grid-template-rows: repeat(3, 70px) 1fr;
  .info {
    grid-area: ~'4 / 1 / 5 / 3';
  }
}

.results-status {
  padding-top: 4px;
  margin-bottom: 5px;

  .disabled {
    .opacity(0.1);
  }

  span.status {
    margin-right: 10px;
    &::before {
      content: '';
      display: inline-block;
      width: 23px;
      height: 23px;
      vertical-align: middle;
      background-position-y: -2px;
      background-repeat: no-repeat;
      margin-right: 8px;
    }

    &.success::before {
      background-image: url('../assets/img/success_status.png');
    }

    &.failure::before {
      background-image: url('../assets/img/error_status.png');
    }

    &.pending::before {
      background-image: url('../assets/img/pending_status.png');
    }

    &.skipped::before {
      background-image: url('../assets/img/skipped_status.png');
    }

    &.inprogress::before {
      background-image: url('../assets/img/progress_status.png');
    }
  }
}

.code {
  font-family: monospace;
  border: 1px solid @lightgrey;
  background-color: @lightestgrey;
  border-radius: 4px;
  padding: 24px 14px 20px 24px;
  max-height: 43vh;
  overflow-y: auto;
  position: relative;
  white-space: pre-line;
  font-size: 14px;
  margin-top: 5px;

  &.log {
    margin: 24px;
  }
}

span.code {
  padding: 2px;
}

/* Forms and inputs*/

input[required]:-moz-ui-invalid {
  box-shadow: none;
}

.inputGroup {
  padding: 12px;
  background-color: rgba(66, 66, 66, 0.03);
}

p.info,
span.info {
  margin: 15px 0;
  color: rgba(66, 66, 66, 0.6);

  &.icon {
    position: relative;
    padding-left: 30px;

    svg {
      position: absolute;
      left: 0;
    }
  }
}

form .required::after {
  content: '* required';
  position: absolute;
  top: 50%;
  left: 102%;
  font-size: 12px;
  color: @linkgreen;
  width: 100px;
}

form .required.file {
  width: 400px;
  &:after {
    top: -38px;
    position: relative;
  }
}

input[type='file'].fileInput,
input[type='text'].fileInput {
  width: 400px !important;
  margin: 32px 0 10px 0;
  cursor: pointer;
  z-index: 1 !important;
  &:first-child {
    z-index: 2 !important;
    cursor: pointer !important;
  }

  .placeholder({background-image: url('../assets/img/file_upload.png') ; background-position: right; background-repeat: no-repeat;});

  &.error {
    border-bottom-width: 2px;
    border-bottom-color: @errorStyleColor;
  }
}

textarea#inline-description {
  height: initial !important;
  font-size: 12px !important;
  margin-top: 0 !important;
}

.inputHeader {
  color: rgba(0, 0, 0, 0.5);
  font-size: 12px;
  display: block;
}

.dropzone {
  padding-top: @defaultGutterWidth;
  padding-bottom: @defaultGutterWidth;
  cursor: pointer;
  .dashboard-placeholder {
    .transition(all 0.4s ease);
  }
  .icon {
    position: relative;
    .transition(all 0.4s ease);
  }
  &.onboard:hover,
  &.active {
    background-color: @lightestgrey;
    .icon {
      .animation(bouncedownup 1.3s infinite);
    }
    .dashboard-placeholder {
      color: lighten(@text, 33%);
    }
    border-width: 2px;
  }
  &:focus {
    outline: none !important;
  }
  &.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    &:hover {
      background-color: initial;
    }
    a {
      cursor: not-allowed;
    }
  }
}

div:focus {
  outline: none !important;
}

.key-value-container button {
  margin-left: 8px;
  height: 100%;
  align-self: center;
}

/* Log in */
#login-box {
  .animation(fadein 1s 1);
  width: 25%;
  max-width: 400px;
  min-width: 240px;
  margin: 12% auto 0;
  position: relative;

  h3 {
    text-transform: uppercase;
    color: @grey;
    font-weight: normal;
    text-align: center;
  }

  img {
    max-width: 100%;
  }

  .help-text,
  .help-text p {
    color: rgba(66, 66, 66, 0.6);
    text-align: left;
    font-size: 12px;
  }
}

form .button-holder {
  background-color: @lightestgrey;
  padding: 10px 20px;
  margin-left: -10px;
  max-width: 100%;
}

#password-holder {
  position: relative;
  display: inline-block;
  max-width: 100%;

  > div > div > div {
    max-width: 100%;
  }

  &.edit-pass {
    background-color: @lightestgrey;
    padding: 0 20px 10px;

    .required {
      margin-right: 60px;
    }
  }

  .pass-buttons {
    display: flex;
    justify-content: flex-end;
    button:first-of-type {
      margin-right: @defaultGutterWidth;
    }
  }
}

#pass-strength {
  margin-top: 10px;
  meter {
    margin-left: 8px;
    margin-right: 8px;
  }
  svg {
    vertical-align: middle;
  }
}

/* icons */

button:disabled .material-icons {
  color: rgba(0, 0, 0, 0.3) !important;
}

button.remove-icon:disabled .material-icons {
  color: rgba(0, 0, 0, 0.3) !important;
}

button.remove-icon .material-icons {
  color: @linkhover !important;
}

.inline-action {
  position: relative;
  top: -6px;
  margin-left: 10px;
}

.material-icons.error-icon {
  color: @errorStyleColor !important;
}

/* tables */

hr.table-divider {
  border: 0;
  height: 6px;
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0));
}

// table expanding
tr.expand {
  background-color: rgb(245, 245, 245);

  .device-info {
    margin-bottom: 10px;
    h3 {
      font-family: Lato, sans-serif;
      color: rgba(0, 0, 0, 0.8);
      font-size: 1.17em;
      font-weight: 700;
    }
  }

  td {
    vertical-align: top;
    padding-top: 16px;

    div.expanded {
      position: absolute;
      left: 2 * @defaultGutterWidth;
      right: 0;
      margin-top: 60px;
      padding: 0 3 * @defaultGutterWidth 2 * @defaultGutterWidth;
    }
  }
}

.bordered {
  border: 1px solid @lightgrey;
  margin-top: 10px;
  padding: 5px 20px;
}

.deviceList {
  min-width: 800px;
  .header {
    padding: 0 24px;
    align-items: center;
    height: 56px;
    font-size: 12px;
    color: @textmuted;
  }
  .columnHeader {
    padding: 0 24px;
  }
  .body > div:last-of-type {
    border-bottom: 1px solid @bordercolor;
  }
  .deviceListItem {
    border-top: 1px solid @bordercolor;
    &:hover {
      background: @lightestgrey;
    }
    .expandedDevice {
      padding-left: 48px;
      padding-right: 35px;
    }
    .device-identity,
    .device-actions {
      position: relative;
      width: 100%;
    }
    .device-inventory.bordered {
      padding-bottom: 20px;
    }
    .device-inventory .report-list {
      width: 45%;
    }
    .deviceStatus {
      border-color: @verylightgrey;
      color: @verylightgrey;
      font-size: 0.8em;
      line-height: 0.8em;
      .notificationCounter {
        width: 14px;
        height: 14px;
        background-color: @verylightgrey;
        margin-left: 5px;
        margin-right: -5px;
        color: @lightestgrey;
      }
    }
  }
  &.pending .deviceListItem {
    background: @lightergrey;
  }
}

.inventory-text {
  word-break: break-word;
  display: inline-block;
  overflow: hidden;
  max-height: 46px;
  &.expanded-attribute {
    display: inline;
    overflow: initial;
    max-height: initial;
  }
  &.break-all {
    word-break: break-all;
  }
  &.tenant-token-text {
    display: block;
    max-height: initial;
    white-space: nowrap;
    text-overflow: ellipsis;
    &.expanded-attribute {
      white-space: initial;
    }
  }
}

.grouplist div span {
  font-size: 0.9rem;
}

.leftNav ul a div span {
  font-size: 0.9rem;
}

div.waiting-inventory {
  padding: 24px 18px 0;
  border: 1px dashed @lightgrey;
  border-radius: 5px;
  color: rgba(0, 0, 0, 0.5);
  text-align: center;
  white-space: normal;
  position: relative;
  p {
    margin: 0.5em 0;
    font-size: 14px;
  }
}

#authorize > div {
  padding-bottom: @defaultGutterWidth;
}

/* device auth */
.actionButtons > span,
.actionButtons > a {
  margin-right: 20px;
}

.expand-confirm {
  overflow: hidden;
  padding: 0 5px 5px 0;
}

/* Buttons */

.fixedButtons {
  position: fixed;
  bottom: 2 * @defaultGutterWidth;
  left: 198px;
  right: 2 * @defaultGutterWidth;
  padding: @defaultGutterWidth 2 * @defaultGutterWidth;
  background-color: rgba(255, 255, 255, 0.8);
  .animation(fadein 0.3s 1);
  z-index: 1;
}

.top-right-button {
  position: absolute;
  top: 2 * @defaultGutterWidth;
  right: 2 * @defaultGutterWidth;
  z-index: 100;
}

.bottom-right-button {
  position: absolute;
  bottom: @defaultGutterWidth;
  right: @defaultGutterWidth;
}

/* Tags */

.tagContainer {
  margin-top: 20px;
}

.ReactTags__tag {
  margin-right: 10px;
  margin-bottom: 5px;
  padding: 5px;
  background-color: @lightgrey;
  color: @linkhover;
  display: inline-block;
  margin-top: 5px;
  font-size: 13px;
}

.ReactTags__remove {
  cursor: pointer;
  padding: 10px 0 10px 10px;
}

.ReactTags__tagInput input,
.ReactTags__tagInput input:focus,
input.fileInput {
  outline: none;
  border-top: none;
  border-left: none;
  border-right: none;
  border-bottom: solid 1px @bordercolor;
  padding: 7px 0;
  font-size: 16px;
  font-family: Lato, sans-serif;
  color: rgba(0, 0, 0, 0.8);

  .placeholder({color: rgba(0, 0, 0, 0.3) ;});
}

/* Dashboard */

.dashboard-placeholder {
  font-size: 16px;
  color: @grey;
  text-align: center;
  padding: @defaultGutterWidth 2 * @defaultGutterWidth;
  .animation(fadein 0.2s 1);

  img {
    margin-top: @defaultGutterWidth;
    width: 74px;
  }
}

.deployments {
  position: relative;
  .current-widget {
    max-width: 15vw;
    min-width: 200px;
    width: 100%;
    &.active {
      background: fade(@mendergreen, 7.5%);
    }
    &.pending {
      background: fade(@mendermaroon, 7.5%);
    }
  }
  .completionInfo {
    color: @verylightgrey;
    font-size: small;
  }
  .statusText {
    min-width: 100px;
  }
  .activity {
    border-style: solid;
    border-width: 1px;
    border-color: @placeholder;
    border-radius: 2px;
    padding: @defaultGutterWidth;
    max-width: 60vw;
    margin-bottom: 3.5vh;
    h4 {
      color: @verylightgrey;
      text-transform: capitalize;
      margin: 0;
    }
  }
}

span.month,
span.day {
  display: block;
  text-align: center;
}

.dashboard-header {
  border-bottom: 1px solid @lightgrey;
  margin-bottom: @defaultGutterWidth;
  position: relative;

  span {
    position: absolute;
    background: #ffffff;
    padding: 10px @defaultGutterWidth 10px 0;
    top: -19px;
  }

  h2,
  h3 {
    margin: 8px 0;
  }

  .dashboard-number {
    margin-left: 10px;
    color: @grey;
  }

  svg {
    vertical-align: middle;
    margin: 0px 10px 4px 0;
  }
}

.progress-container {
  padding-bottom: 3 * @defaultGutterWidth;

  .device-info {
    position: absolute;
    width: 33%;
    right: -16px;
    background-color: #fff;
    top: -2 * @defaultGutterWidth;
    bottom: @defaultGutterWidth;
    z-index: 300;
    padding: 0 2 * @defaultGutterWidth;
    box-sizing: border-box;
    display: none;
    border-left: 1px @linkhover solid;
    font-size: 12px;
    word-break: break-all;

    &.show {
      display: block;
      .animation(fadein 0.2s 1);
    }
  }

  .key {
    color: @grey;
    font-size: 12px;
    clear: both;
    vertical-align: middle;
    margin-top: 10px;
    text-align: center;
    width: 60%;

    .bubble {
      width: 14px;
      height: 14px;
      border-radius: 50%;
      display: inline-block;
      margin-left: 6px;
      margin-right: 2px;
      margin-top: -2px;
      vertical-align: middle;
      position: relative;
      background-size: cover;

      &.success {
        background-image: url('../assets/img/success_status.png');
      }
      &.failure {
        background-image: url('../assets/img/error_status.png');
      }
      &.pending {
        background-image: url('../assets/img/pending_status.png');
      }
      &.inprogress,
      &.installing {
        background-image: url('../assets/img/progress_status.png');
      }
      &.downloading,
      &.rebooting {
        background-image: url('../assets/img/progress_status.png');
      }
    }
  }

  .progressHeader {
    position: absolute;
    top: -3 * @defaultGutterWidth;
    left: 18%;
    color: #757575;
    font-size: 14px;
  }

  .bubbles-contain {
    height: 100px;
    min-width: 300px;
    width: 60%;
    position: relative;
    top: -10px;
    padding-left: 2 * @defaultGutterWidth;

    > div {
      float: left;
      margin: 0 10px 4px 0;
      position: relative;
      cursor: pointer;
      max-height: 80px;
      max-width: 80px;

      &:hover:after {
        content: '';
        position: absolute;
        top: 50%;
        left: 110%;
        width: 500px;
        border-bottom: 1px @linkhover solid;
        z-index: 200;
        .animation(fadein 0.6s 1);
      }
    }

    .bubble {
      border-radius: 50%;
      position: relative;
      display: block;
      height: 100%;
      width: 100%;
      background-size: 66%;
      background-repeat: no-repeat;
      background-position: center;
      background-color: @lightergrey;

      &:hover {
        .scale(1.15);
        .transition(all 0.2s ease);
        border: 1px solid @linkhover;
      }
    }

    .inprogress .bubble,
    .installing .bubble {
      .animation(pulse 2.8s infinite);
      background-image: url('../assets/img/progress_status_large.png');
    }

    .downloading .bubble,
    .rebooting .bubble {
      .animation(pulse 2.8s infinite);
      background-image: url('../assets/img/progress_status.png');
    }

    .pending .bubble {
      background-color: lighten(@lightergrey, 4%);
      background-image: url('../assets/img/pending_status_large.png');
    }
    .failure .bubble {
      background-image: url('../assets/img/error_status_large.png');
    }
    .success .bubble {
      background-image: url('../assets/img/success_status_large.png');
    }
  }
}

.report-container {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr;
  grid-column-gap: 2 * @defaultGutterWidth;
  .deploymentInfo {
    margin-top: 30px;
    font-size: 14px;
    flex-grow: 1;
    > div {
      margin-bottom: 10px;
      overflow: hidden;
      text-overflow: ellipsis;
    }
  }

  .progressLabel {
    color: @grey;
    margin-right: 5px;
    margin-bottom: 0;
    width: 100px;
    display: inline-block;
  }

  .skipped-text {
    color: @grey;
    text-align: center;
    font-size: 12px;
    margin-top: 12px;
  }
}

.deploy-table-contain {
  margin-bottom: 60px;
  margin-top: 2 * @defaultGutterWidth;
}

.fail {
  color: @red;

  > div {
    background-color: #f6f1f1;
  }

  div {
    color: @red !important;
  }

  .material-icons {
    color: @red !important;
  }
}

/* Deployments */
.deployments-pending {
  padding: 10px @defaultGutterWidth 2 * @defaultGutterWidth;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background-color: #fdfdfd;
  .dashboard-header {
    margin-bottom: 2 * @defaultGutterWidth;
    span {
      background: #fdfdfd;
    }
  }
  .deploy-table-contain {
    margin-bottom: initial;
  }
}

.deployment-item {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 0.75fr 4fr 1.2fr 50px;
  grid-column-gap: 2 * @defaultGutterWidth;
  border-bottom: 1px solid @bordercolor;
  margin: 0 @defaultGutterWidth;
  padding: 10px 0;
  align-items: center;
  position: relative;
  min-width: 1300px;
  &.deployment-header-item {
    border-bottom: transparent;
    &.progress-item {
      padding-right: @defaultGutterWidth;
    }
  }
  &.scheduled-item {
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr 1.2fr 50px;
  }
  &.past-item {
    grid-template-columns: 2fr 1fr 1fr 1fr 0.75fr 4fr 1fr;
  }
  &:last-of-type {
    border-bottom: transparent;
  }
  > div,
  time {
    min-width: 100px;
  }
  > .column-defined {
    min-width: initial;
  }
  .cancelButton:hover {
    color: @red;
  }
  .progress-chart-container {
    background: @lightestgrey;
    padding: 10px 20px;
    height: 70px;
    border-radius: @dotSize * 0.5;
    justify-content: center;
    .progress-chart,
    .progress-step-total {
      display: flex;
      width: 100%;
      min-height: 20px;
      height: 100%;
      position: relative;
    }
    .progress-step {
      border-right: 1px dashed @verylightgrey;
      display: flex;
      align-items: center;
      z-index: 1;
    }
    .progress-bar {
      height: 5px;
      background-color: currentColor;
    }
    .progress-step-total {
      position: absolute;
      z-index: 0;
      border: none;
      .progress-bar {
        background-color: @lightgrey;
      }
    }
  }
  .confirmation-overlay {
    position: absolute;
    z-index: 1;
    background: fadeout(@lightestgrey, 20%);
    width: 100%;
    height: 100%;
    justify-content: flex-end;
  }
}

.deployment-phases-list {
  overflow: auto;
  max-width: 900px;
  & > .column {
    min-width: 115px;
    margin: 0 5px;
    justify-content: flex-end;
    & > div {
      margin: 5px 0;
    }
    .MuiChip-root {
      width: fit-content;
    }
  }
}

// deployment progress report
.deployment-report {
  .MuiTab-textColorInherit {
    color: @verylightgrey;
  }
  .MuiTab-root {
    height: 100%;
    min-height: 0px;
    min-width: fit-content;
  }
}

.statusLarge {
  > img {
    vertical-align: top;
    display: inline;
  }
  .statusWrapper {
    max-width: 160px;
    min-height: 38px;
    padding: @defaultGutterWidth @defaultGutterWidth 25px 20px;
    margin: 0 8px 10px 10px;
    background-color: @lightestgrey;
    position: relative;
    display: inline-block;
    font-size: 16px;
    vertical-align: top;
    white-space: normal;
    &:after {
      content: '';
      width: 0;
      height: 0;
      position: absolute;
      z-index: 20000;
      top: 5px;
      left: -19px;
      border-bottom: 10px solid transparent;
      border-right: 20px solid @lightestgrey;
    }
  }
}

.progressStatus {
  background-color: @lightestgrey;
  padding: @defaultGutterWidth 4 * @defaultGutterWidth @defaultGutterWidth;
  #progressStatus {
    text-align: center;
    vertical-align: top;
  }
}

.material-list-item {
  padding: 20px 16px 16px;
  overflow: hidden;

  h4 {
    margin: 0;
    font-size: 16px;
    font-weight: normal;
  }
  p {
    margin: 4px 0px 0px;
    color: rgba(0, 0, 0, 0.54);
  }
}

.substate {
  width: 64%;
  min-width: 200px;
  overflow: hidden;
  color: @verylightgrey;
  white-space: normal;
  word-wrap: break-word;
  margin-left: 5px;
}

.substateText {
  color: @verylightgrey;
  word-break: break-word;
}

// Past deployments
.datepicker-container {
  background-color: @lightestgrey;
  padding: 0px 25px 5px;
}

// Releases & Artifacts
.repository {
  min-height: 400px;
  height: 100%;
  display: flex;
  .repository-list {
    border-right: 1px solid @lightergrey;
    min-width: 1.5 * @defaultLeftBarWidth;
    width: 100%;
    max-width: 3 * @defaultLeftBarWidth;
    > div.margin-bottom-small {
      height: 85px;
    }
    > ul {
      overflow: auto;
      height: 70vh;
    }
  }
  .release-repo {
    overflow: auto;
    width: 100%;
  }
}
.release-repo > .flexbox:first-of-type {
  padding-top: @defaultGutterWidth;
}

.repository-list-item {
  &.active {
    background-color: @lightestgrey;
  }
  & > div {
    padding-right: 0;
  }
  .flexbox {
    justify-content: space-between;
    align-items: center;
  }
  .indicator {
    opacity: 0;
  }
  &:hover .indicator {
    .animation(fadein 0.2s 1);
    opacity: 1;
  }
}

.release-repo-item {
  padding-bottom: 2vh;
  & > div.muted {
    margin: 18px 12px 0 0;
  }
  &.repo-header {
    padding-left: 2 * @defaultGutterWidth;
    padding-right: 12px;
    height: 56px;
    font-size: 12px;
    color: @mendermaroon;
  }
  &.repo-item,
  .repo-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 48px;
    grid-column-gap: 20px;
    .text-overflow {
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
    }
  }
}

@keyframes fadein {
  0% {
    .opacity(0);
  }
  100% {
    .opacity(1);
  }
}

@keyframes pulse {
  0% {
    .opacity(1);
  }
  50% {
    .opacity(0.5);
  }
  100% {
    .opacity(1);
  }
}

@keyframes spin {
  100% {
    .rotate(360deg);
  }
}

@keyframes bounce {
  0% {
    .scale(0.9);
    animation-timing-function: ease-in;
  }
  37% {
    .scale(1.1);
    animation-timing-function: ease-out;
  }
  55% {
    .scale(1.3);
    animation-timing-function: ease-in;
  }
  81% {
    .scale(1.2);
    animation-timing-function: ease-out;
  }
  100% {
    .scale(1.3);
  }
}

@keyframes bouncedownup {
  0% {
    top: 0;
    animation-timing-function: ease-out;
  }
  8% {
    top: 1px;
    animation-timing-function: ease-out;
  }
  16% {
    top: 0;
    animation-timing-function: ease-out;
  }
  32% {
    top: -2px;
    animation-timing-function: ease-out;
  }
  50% {
    top: 0px;
    animation-timing-function: ease-out;
  }
  100% {
    top: 0;
  }
}

@keyframes bouncerightleft {
  0% {
    left: 0;
    animation-timing-function: ease-out;
  }
  8% {
    left: 1px;
    animation-timing-function: ease-out;
  }
  16% {
    left: 0;
    animation-timing-function: ease-out;
  }
  32% {
    left: -2px;
    animation-timing-function: ease-out;
  }
  50% {
    left: 0px;
    animation-timing-function: ease-out;
  }
  100% {
    left: 0;
  }
}
@keyframes bouncerightleft {
  0% {
    right: 0;
    animation-timing-function: ease-out;
  }
  8% {
    right: 1px;
    animation-timing-function: ease-out;
  }
  16% {
    right: 0;
    animation-timing-function: ease-out;
  }
  32% {
    right: -2px;
    animation-timing-function: ease-out;
  }
  50% {
    right: 0px;
    animation-timing-function: ease-out;
  }
  100% {
    right: 0;
  }
}

div.shake-alert {
  animation: shake 0.72s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  transform: translate3d(0, 0, 0);
}

@keyframes shake {
  10%,
  90% {
    transform: translate3d(-1px, 0, 0);
  }

  20%,
  80% {
    transform: translate3d(1px, 0, 0);
  }

  30%,
  50%,
  70% {
    transform: translate3d(-2px, 0, 0);
  }

  40%,
  60% {
    transform: translate3d(2px, 0, 0);
  }
}

/* LESS MIXINS */
.flip-horizontal {
  -moz-transform: scale(-1, 1);
  -webkit-transform: scale(-1, 1);
  -o-transform: scale(-1, 1);
  -ms-transform: scale(-1, 1);
  transform: scale(-1, 1);
}

.scale (@factor) {
  -webkit-transform: scale(@factor);
  -moz-transform: scale(@factor);
  -ms-transform: scale(@factor);
  -o-transform: scale(@factor);
}

.transition (@transition) {
  -webkit-transition: @transition;
  -moz-transition: @transition;
  -ms-transition: @transition;
  -o-transition: @transition;
}

.animation (@animation) {
  -webkit-animation: @animation;
  -moz-animation: @animation;
  -ms-animation: @animation;
  -o-animation: @animation;
}

.opacity (@opacity: 0.5) {
  -webkit-opacity: @opacity;
  -moz-opacity: @opacity;
  opacity: @opacity;
}

.rotateX (@deg) {
  -webkit-transform: rotateX(@deg);
  -moz-transform: rotateX(@deg);
  -ms-transform: rotateX(@deg);
  -o-transform: rotateX(@deg);
}
.rotateY (@deg) {
  -webkit-transform: rotateY(@deg);
  -moz-transform: rotateY(@deg);
  -ms-transform: rotateY(@deg);
  -o-transform: rotateY(@deg);
}
.rotate (@deg) {
  -webkit-transform: rotate(@deg);
  -moz-transform: rotate(@deg);
  -ms-transform: rotate(@deg);
  -o-transform: rotate(@deg);
}

@keyframes highlight {
  0% {
    border-color: lighten(@alertpurple, 10%);
    animation-timing-function: ease-in;
  }
  50% {
    border-color: lighten(@alertpurple, 70%);
    animation-timing-function: ease-out;
  }
  100% {
    border-color: lighten(@alertpurple, 10%);
    animation-timing-function: ease-in;
  }
}

.placeholder(@rules) {
  &::-webkit-input-placeholder {
    @rules();
  }
  &:-moz-placeholder {
    @rules();
  }
  &::-moz-placeholder {
    @rules();
  }
  &:-ms-input-placeholder {
    @rules();
  }
}

/* Progress bar */
#progressBarContainer {
  position: fixed;
  left: 230px;
  right: 2 * @defaultGutterWidth;
  bottom: 80px;
  background-color: #ffffff;
  border: 1px solid @lightergrey;
  border-radius: 4px;
  height: 60px;
  padding: 0 @defaultGutterWidth;
  overflow: hidden;
  color: @grey;
  margin: 25px 0 @defaultGutterWidth;
  .transition(all 0.2s ease-in-out);
  &.shrunk {
    border: none;
    height: 0;
  }
}
